package com.java.main.controller.input;

import com.java.main.domain.KbmContent;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("翻页输入包")
public class PageInput {
	public static final String DESC = "desc";
	public static final String ASC = "asc";
	@ApiModelProperty("每页条数")
	private Integer size = 10;
	@ApiModelProperty("页码，第一页为1")
	private Integer page = 1;
	@ApiModelProperty("排序字段")
	private String sortField = "id";
	@ApiModelProperty("排序方法")
	private String sortOrder = "desc";

	@ApiModelProperty(hidden = true)
	private KbmContent kbmContent;

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public Integer getPage() {
		return page > 0 ? page : 1;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public String getSortField() {
		return sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField.trim();
	}

	public String getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder.trim();
	}

	public KbmContent getKbmContent() {
		return kbmContent;
	}

	public void setKbmContent(KbmContent kbmContent) {
		this.kbmContent = kbmContent;
	}

}
